cmake_minimum_required(VERSION 2.8)

message("-- Project: access")

file(GLOB access_src "*.cpp")
file(GLOB sqlite_src "*.c")
	
add_library(access SHARED ${access_src} ${sqlite_src})
set_target_properties(access PROPERTIES OUTPUT_NAME "access")
target_link_libraries(access stdcrt)

include_directories(
		${PROJECT_SOURCE_DIR}/include
		${PROJECT_SOURCE_DIR}/crt
		${PROJECT_SOURCE_DIR}/extensions/include
		${by3rd_library_include})

if (${WIN_OS})


	target_link_libraries(access shlwapi)

	set(CMAKE_SHARED_LINKER_FLAGS 
		"${CMAKE_SHARED_LINKER_FLAGS} /DEF:${PROJECT_SOURCE_DIR}/access/dllexports.def")

else()

	include_directories(
		/usr/local/include
		/opt/local/include
		/usr/include)



	set_target_properties(access PROPERTIES COMPILE_FLAGS ${dynamic})
	set_target_properties(access PROPERTIES COMPILE_FLAGS ${compile})
	set_target_properties(access PROPERTIES LINK_FLAGS ${r_path})

	if(${LINUX_OS})
		target_link_libraries(access dl)
	endif()

	if(${UNIX_OS})
		target_link_libraries(access)
	endif()


	
endif()








